<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="leagal_aid.bean.*,java.util.*,java.io.*" %>
<%
request.setCharacterEncoding("utf-8");

int id = Integer.parseInt(request.getParameter("id"));
String title = request.getParameter("title");
String name = request.getParameter("name");
String email = request.getParameter("email");
String telephone = request.getParameter("telephone");
String address = request.getParameter("address");

ContactBean contactBean = new ContactBean();
    if(contactBean.doUpdata(title, name,telephone,email,address,id)){
		response.setCharacterEncoding("utf-8");
		PrintWriter pout = response.getWriter();
		pout.print("<script>alert('修改成功'); window.location='../contact.jsp' </script>");
		pout.flush();
		pout.close();
    	
	}else{
		response.setCharacterEncoding("utf-8");
		PrintWriter pout = response.getWriter();
		pout.print("<script>alert('修改不成功'); window.location='../contact.jsp' </script>");
		pout.flush();
		pout.close();
		//response.sendRedirect("login.html");
	};

%>